<extend name="Public:common"/>
<block name="css">
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
    <style>
        .newMess th{text-align:center;}
        th,td{padding: 10px;}
        .col-md-2 {
            width: 13.6666%!important;
            padding-left: 0px!important;
            padding-right: 0px!important;
        }
        .col-md-5 {
            width: 33.6666%!important;
            color: #777;
            padding-left: 2px!important;
        }
        .row-div {
            height: auto;
            line-height: 30px;
            font-size: 14px;
            margin-bottom: 10px;
            padding: 0px 100px!important;
        }
        .base-info-box{
            margin: 20px 40px;
            height: 40px;
            line-height: 40px;
            background-color: #F6FBFD;
        }
        .header-bg-01{
            width: 2px;
            height: 40px;
            background-color: #5BC0DE;
            display: inline-block;
            float: left;
        }
        .header-title{
            float: left;
            display: inline-block;
            height: 40px;
            padding-left: 20px;
            line-height: 40px;
        }

        .explain{
            font-size: 12px;
            color: #ccc;
            height: 20px;
        }
        .margin-left-20{
            margin-left: 20px!important;
        }
        #wrapper{
            width: 900px!important;
        }
    </style>
</block>
<block name="content">
    <div class="page-header"><h1><i class="fa fa-home"></i>首页 > 财务管理 &gt;销售订单结算&gt;结算详情</h1></div>
     <div class="container-fluid">
        <div class="base-info-box">
                <span class="header-bg-01"></span>
                <span class="header-title">订单信息</span>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">订单状态：</p></div>
            <div class="col-md-5">
                <if condition="$detailInfo['order_status'] eq -3">待退款
                <elseif condition="$detailInfo['order_status'] eq -4"/>已退款
                <elseif condition="$detailInfo['order_status'] eq 2"/>预订成功(带出团)
                <elseif condition="$detailInfo['order_status'] eq -2"/>待结算
                </if>
            </div>
            <div class="col-md-2" ><p class="text-right">线路名称：</p></div>
            <div class="col-md-5">{$detailInfo['line_name']}</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">订单号：</p></div>
            <div class="col-md-5">{$detailInfo['order_num']}</div>
            <div class="col-md-2" ><p class="text-right">出团日期：</p></div>
            <div class="col-md-5">{$detailInfo['start_time']|date='Y-m-d H:i:s',###}</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">下单时间：</p></div>
            <div class="col-md-5">{$detailInfo['create_time']|date='Y-m-d H:i:s',###}</div>
            <div class="col-md-2" ><p class="text-right">出游人数：</p></div>
            <div class="col-md-5">{$detailInfo.total_num}人({$detailInfo.adult_num}大/{$detailInfo.child_num}小/{$detailInfo.oldMan_num}老)</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">联系人：</p></div>
            <div class="col-md-5">{$detailInfo.tourists_name}({$detailInfo.tourists_phone})</div>
            <div class="col-md-2" ><p class="text-right">订单备注：</p></div>
            <div class="col-md-5">{$detailInfo.order_remarks}</div>
        </div>
        <div class="base-info-box">
            <span class="header-bg-01"></span>
            <span class="header-title">支付信息</span>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">订单总额：</p></div>
            <div class="col-md-5">¥{$detailInfo.total_money}</div>
            <div class="col-md-2" ><p class="text-right">实收金额：</p></div>
            <div class="col-md-5">¥{$detailInfo.end_need_pay}</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">未收金额：</p></div>
            <div class="col-md-5">
                ¥0.00
            </div>
            <div class="col-md-2" ><p class="text-right">实际可退金额：</p></div>
            <div class="col-md-5">¥{$detailInfo.back_money}</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">退款金额：</p></div>
            <div class="col-md-5">
                <if condition="$detailInfo['order_status'] eq -3">¥{$detailInfo.total_money}
                <elseif condition="$detailInfo['order_status'] eq -4"/>¥{$detailInfo.total_money}
                <elseif condition="$detailInfo['order_status'] eq 2"/>¥0.00
                <elseif condition="$detailInfo['order_status'] eq -2"/>¥0.00
                </if>
            </div>
        </div>
        <!-- <button type="button" class="btn btn-primary" style="margin-left: 40px;">退款</button> -->
        <!-- <button type="button" class="btn btn-primary">收款明细</button> -->
        <div class="base-info-box">
            <span class="header-bg-01"></span>
            <span class="header-title">发票信息</span>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">发票代码：</p></div>
            <div class="col-md-5">{$receiptInfo.receipt_code}</div>
            <div class="col-md-2" ><p class="text-right">发票号码：</p></div>
            <div class="col-md-5">{$receiptInfo.receipt_num}</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">发票金额：</p></div>
            <div class="col-md-5">{$receiptInfo.receipt_amount}</div>
            <div class="col-md-2" ><p class="text-right">发票抬头：</p></div>
            <div class="col-md-5">{$receiptInfo.receipt_rise}</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">发票内容：</p></div>
            <div class="col-md-5">{$receiptInfo.receipt_content}</div>
        </div>
        <div class="row row-div">
            <div class="col-md-2" ><p class="text-right">备注：</p></div>
            <div class="col-md-5">{$receiptInfo.remarks}</div>
        </div>
        <div class="base-info-box">
            <span class="header-bg-01"></span>
            <span class="header-title">游客信息</span>
        </div>
        <div class="row row-div">
            <table class="table table-striped table-bordered table-hover table-condensed">
                <tr>
                    <th>游客</th>
                    <th>游客状态</th>
                    <th>游客类型</th>
                    <th>游客个人信息</th>
                    <th>团费</th>
                    <th>保险</th>
                    <th>单房差</th>
                    <th>附加产品</th>
                    <th>总金额</th>
                    <th>备注</th>
                    <th>操作</th>
                </tr>
                <foreach name="detailInfo['tourists']" item="v">
                    <tr>
                        <td>{$v['tourists_name']}</td>
                        <td>生效</td>
                        <td>
                            <if condition="$v['tourists_type'] eq 1">成人
                            <elseif condition="$v['tourists_type'] eq 2"/>老人
                            <elseif condition="$v['tourists_type'] eq 3"/>小孩
                            </if>
                            <if condition="$v['is_contact'] eq 1">(联系人)
                            </if>
                        </td>
                        <td>
                            性别：<if condition="$v['tourists_sex'] eq 1">男
                                 <elseif condition="$v['tourists_type'] eq 2"/>女
                                 </if>
                            身份证：{$v['documents_num']}
                            手机：{$v['tourists_phone']}

                        </td>
                        <td>{$v['receipt_num']}</td>
                        <td>{$v['receipt_amount']}</td>
                        <td>{$v['receipt_rise']}</td>
                        <td>{$v['receipt_content']}</td>
                        <td></td>
                        <td>{$v['remarks']}</td>
                        <td>
    
                        </td>
                    </tr>
                </foreach>
            </table>
        </div>
    </div>
</block>
<block name="js">
    <script src="__STATIC__/layui/layui.all.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <script>
        layui.use('laydate', function() {
            var laydate = layui.laydate;
            //常规用法
            laydate.render({
                elem: '#start_time'
            });
            laydate.render({
                elem: '#end_time'
            });
        });
    </script>
</block>